package com.zt.ztyh.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zt.ztyh.dto.LoanDto;
import com.zt.ztyh.dto.LoanUser;
import com.zt.ztyh.entity.Loan;
import com.zt.ztyh.vo.loan.LoanVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;


public interface LoanMapper extends BaseMapper<Loan> {

    Page<LoanVo> findUserLoan(@Param("page") Page<LoanVo> page,@Param("loanDto") LoanDto loanDto);

    /**
     * 测试
     * @param loanUser
     * @return
     */
    int updateLoanUser(LoanUser loanUser);

    @Select("select * from ztyh_loan_user where id=#{id}")
    LoanUser getById(Long id);

    void unUpdateLoan(Long uid, BigDecimal amount, int i);

    @Select("select * from ztyh_loan where lid=#{lid}")
    Loan findById(Long lid);

    /**
     * 结尾
     */
}




